<template>
  <div class="learn">
    <!-- 顶部栏 -->
    <van-nav-bar title="已购课程"></van-nav-bar>
    <!-- 课程列表 -->
    <course-content-list :callback="loadCourse"></course-content-list>
    <!-- 底部导航 -->
    <layout-footer></layout-footer>
  </div>
</template>

<script>
import { NavBar } from 'vant'
import { getPurchaseCourse } from '@/service/course'
import LayoutFooter from '@/components/layout-footer.vue'
import CourseContentList from '@/components/course-content-list.vue'
export default {
  components: { LayoutFooter, CourseContentList, VanNavBar: NavBar },
  methods: {
    loadCourse () {
      return getPurchaseCourse()
    }
  }
}
</script>

<style>
.course-content-list {
  top: 50px;
  bottom: 50px;
}
</style>
